package com.zhangpu.eureka.producer.Controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhangpu
 * @License: (C) Copyright hualala.com Corporation Limited.
 * @Contact: zhangpu@hualala.com
 * @Date: 2021.07.19 16:53
 * @Version: 1.0
 * @Description:
 * @ProjectName: spring-cloud-eureka
 */

@RestController
public class ProducerController {

   @Value("${server.port}")
    private String port;

   @GetMapping("/hi/{name}")
    public String getSpringCloudInfo(@PathVariable(value = "name") String name){
       return "my name is "+name +" this is springcloud program! consumer port is "+port;
   }
}